package com.hongyun.tms.common.dto.dislog;

import com.alibaba.excel.annotation.ExcelProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.hongyun.tms.common.annotation.excel.ExcelInfo;
import com.hongyun.tms.infra.excel.converter.LocalDateTimeOrDateConverter;
import com.hongyun.tms.infra.excel.converter.enums.DisLogEnumConverter;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.time.LocalDate;

/**
 * 调度日志导出
 *
 * @author peng.li
 * @date 2024-09-18
 */

@Data
@ExcelInfo(fileName = "调度日志导出")
public class DisLogExportDto implements Serializable {

    @ApiModelProperty(value = "交接班日期")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @ExcelProperty(value = "交接班日期", converter = LocalDateTimeOrDateConverter.class, index = 0)
    private LocalDate shiftDate;

    @ApiModelProperty(value = "班次,01白班02夜班")
    @ExcelProperty(value = "班次", converter = DisLogEnumConverter.class, index = 1)
    private String classCode;

    @ApiModelProperty(value = "交接班内容")
    @ExcelProperty(value = "交接班内容", index = 2)
    private String remark;
}
